<?php

namespace app\adminapi\model;

use app\helpers\Common;
use app\libs\traits\BaseModelTrait;

//use think\model\concern\SoftDelete;

class AdminRoleUser extends Base
{
    /**
     * Base Model Trait
     */
    use BaseModelTrait;

    //use SoftDelete;

    protected $deleteTime = 'deleted_at';

    // 软删除字段默认值
    protected $defaultSoftDelete = 0;

    // 数据表名称
    protected $name = 'vue_admin_role_user';

    // 当前模型名称 不带前缀
    //protected $name = 'admin_role_user';

    public $pk = 'id';


    public function adminRole()
    {
        return $this->belongsTo(AdminRole::class,'role_id', 'id');
    }
}
